# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Resources_CustomerClient do
  @moduledoc """
  A link between the given customer and a client customer. CustomerClients only exist for manager customers. All direct and indirect client customers are included, as well as the manager itself.

  ## Attributes

  *   `appliedLabels` (*type:* `list(String.t)`, *default:* `nil`) - Output only. The resource names of the labels owned by the requesting customer that are applied to the client customer. Label resource names have the form: `customers/{customer_id}/labels/{label_id}`
  *   `clientCustomer` (*type:* `String.t`, *default:* `nil`) - Output only. The resource name of the client-customer which is linked to the given customer. Read only.
  *   `currencyCode` (*type:* `String.t`, *default:* `nil`) - Output only. Currency code (for example, 'USD', 'EUR') for the client. Read only.
  *   `descriptiveName` (*type:* `String.t`, *default:* `nil`) - Output only. Descriptive name for the client. Read only.
  *   `hidden` (*type:* `boolean()`, *default:* `nil`) - Output only. Specifies whether this is a hidden account. Read only.
  *   `id` (*type:* `String.t`, *default:* `nil`) - Output only. The ID of the client customer. Read only.
  *   `level` (*type:* `String.t`, *default:* `nil`) - Output only. Distance between given customer and client. For self link, the level value will be 0. Read only.
  *   `manager` (*type:* `boolean()`, *default:* `nil`) - Output only. Identifies if the client is a manager. Read only.
  *   `resourceName` (*type:* `String.t`, *default:* `nil`) - Output only. The resource name of the customer client. CustomerClient resource names have the form: `customers/{customer_id}/customerClients/{client_customer_id}`
  *   `status` (*type:* `String.t`, *default:* `nil`) - Output only. The status of the client customer. Read only.
  *   `testAccount` (*type:* `boolean()`, *default:* `nil`) - Output only. Identifies if the client is a test account. Read only.
  *   `timeZone` (*type:* `String.t`, *default:* `nil`) - Output only. Common Locale Data Repository (CLDR) string representation of the time zone of the client, for example, America/Los_Angeles. Read only.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :appliedLabels => list(String.t()) | nil,
          :clientCustomer => String.t() | nil,
          :currencyCode => String.t() | nil,
          :descriptiveName => String.t() | nil,
          :hidden => boolean() | nil,
          :id => String.t() | nil,
          :level => String.t() | nil,
          :manager => boolean() | nil,
          :resourceName => String.t() | nil,
          :status => String.t() | nil,
          :testAccount => boolean() | nil,
          :timeZone => String.t() | nil
        }

  field(:appliedLabels, type: :list)
  field(:clientCustomer)
  field(:currencyCode)
  field(:descriptiveName)
  field(:hidden)
  field(:id)
  field(:level)
  field(:manager)
  field(:resourceName)
  field(:status)
  field(:testAccount)
  field(:timeZone)
end

defimpl Poison.Decoder,
  for: GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Resources_CustomerClient do
  def decode(value, options) do
    GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Resources_CustomerClient.decode(
      value,
      options
    )
  end
end

defimpl Poison.Encoder,
  for: GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Resources_CustomerClient do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
